<?php $user = $session->read('User');
	$isedit=$action->checkPermissions($user,"confirm");
	//print_r($isedit);
 ?>
<div class="right_side_operate_area">
	<?php 
		if($showpage==1) {
			if(isset($paging)){ echo $this->renderElement('pagination',$paging);} 
		}
	?>
	<?php if($isedit){ ?>
	<div class="right item_add_btn"><?php echo $html->link('添加', 'edittecstack');?></div>
	<?php }else{
			echo '<div class="right enableaction">';
			echo "<a>添加</a>";
			echo '</div>';
		}
	 ?>
	<div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
        <div class="items_list">
        	<table>
				<tr>
					<th>名称</th>
			        <th>注册时间</th>
			        <th>注册资本（万）</th>
			        <th>孵化面积（平方米）</th>
			        <th>创建时间</th>
			        <th><?php __("Action")?></th>
				</tr>
				<?php 
				foreach ($techstacks as $techstack): 
					$id=$techstack['Techstack']['id'];
			?>
				<tr class="per_list">
					<td><?php echo $html->link($techstack['Techstack']['name'],"/types/showtecstack/".$id) ;?></td>
					<td>
						<?php echo $str->strarea($techstack['Techstack']['reg_mintime'],$techstack['Techstack']['reg_maxtime'],"time"); ?>
					</td>
					<td>
						<?php echo $str->strarea($techstack['Techstack']['reg_mincaptital'],$techstack['Techstack']['reg_maxcaptital']); ?>
					</td>
					<td>
						<?php echo $str->strarea($techstack['Techstack']['reg_minsize'],$techstack['Techstack']['reg_maxsize']); ?>
					</td>
					<td><?php echo date("Y-m-d",strtotime($techstack['Techstack']['created'])); ?></td>
					<td>
						<?php
						    if($isedit){ 							
							echo $html->link(__('Edit',true), array('action' =>'edittecstack', $id), null, null);
							echo $html->link(__('Delete',true), array('action' =>'deltechstack', $id),  array("onclick"=>"return doaction(this)"));
							} else {
								echo "<span class='enableaction'>编辑</span>";
								echo "<span class='enableaction'>删除</span>"; 
								}					
						?> 
					</td>
				</tr>
			<?php 
				 
				endforeach; 
			?>
			</table>
        </div>
    </div>
</div>
<?php echo $this->element('actionconfirm',array("title"=>"删除提示","message"=>"你确定要删除吗？")) ?>